<template>
  <el-table :data="processData" border :header-cell-style="tableRowClassName">
    <el-table-column width="100" align="center" prop="channel" label="渠道">
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="yesterdaySales"
      label="昨日销售额"
    >
    </el-table-column>
    <el-table-column
      align="center"
      prop="yesterdaySalesYoy"
      label="昨日销售额同比"
      width="120"
    >
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="weeklySales"
      label="本周销售额"
    >
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="weeklySalesCost"
      label="本周成本"
    >
    </el-table-column>
    <el-table-column
      align="center"
      prop="weeklySalesYoy"
      label="本周销售额同比"
      width="120"
    >
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="monthlySales"
      label="本月销售额"
    >
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="monthlySalesTarget"
      label="月销售目标"
    >
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="monthlySalesCost"
      label="本月商品成本"
    >
    </el-table-column>
    <el-table-column
      align="center"
      prop="monthlySalesYoy"
      label="本月销售额同比"
      width="120"
    >
    </el-table-column>
    <el-table-column
      align="center"
      prop="monthlySalesChain"
      label="本月销售额环比"
      width="120"
    >
    </el-table-column>

    <el-table-column
      width="100"
      align="center"
      prop="quarterlySales"
      label="季度销售额"
    >
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="salesTargetQuarterly"
      label="季度销售目标"
    >
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="quarterlySalescost"
      label="季度商品成本"
    >
    </el-table-column>
    <el-table-column
      align="center"
      prop="quarterlySalesYoy"
      label="季度销售额同比"
      width="120"
    >
    </el-table-column>
    <el-table-column
      align="center"
      prop="quarterlySalesChain"
      label="季度销售额环比"
      width="120"
    >
    </el-table-column>

    <el-table-column
      width="100"
      align="center"
      prop="yearSales"
      label="年度销售额"
    >
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="salesTargetYear"
      label="年度销售目标"
    >
    </el-table-column>
    <el-table-column
      width="100"
      align="center"
      prop="yearsalesCost"
      label="年度商品成本"
    >
    </el-table-column>
    <el-table-column
      align="center"
      prop="yearSalesYoy"
      label="年度销售额同比"
      width="120"
    >
    </el-table-column>
    <el-table-column
      align="center"
      prop="yearSalesChain"
      label="年度销售额环比"
      width="120"
    >
    </el-table-column>
  </el-table>
</template>
<script>
export default {
  props: {
    processData: {
      type: Array,
      default: () => [],
    },
  },
  methods: {
    tableRowClassName({ row, column, rowIndex, columnIndex }) {
      if (column.label.includes("周")) {
        return "background:#ed7d31 !important;color:#fff ";
      } else if (column.label.includes("月")) {
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label.includes("季")) {
        return "background:#ed7d31 !important;color:#fff ";
      } else if (column.label.includes("年")) {
        return "color: #515a6e;background:#c4dbf0 !important;";
      } else if (column.label.includes("日")) {
        return "color: #515a6e;background:#c4dbf0 !important;";
      }
    },
  },
};
</script>